//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __ELASTOS_KDBS_H__
#define __ELASTOS_KDBS_H__

#include "gdbstub.h"

INLINE bool_t IsValidKernelAddress(virtaddr_t va)
{
    UInt32 uBase = COMMON_BASE - 0x10000;
    UInt32 uSize = PROCESS_TOP - uBase;

    if (FALL_INTO((UInt32)va, uBase, uSize)) {
        return FALSE;
    }

    return IsPhysicalMemory(PHYSADDR(va), sizeof(int));
}

#endif //__ELASTOS_KDBS_H__
